_getBannerAllocation(dialogBox) {
let actorBox = new Clutter.ActorBox();
- let [minWidth, minHeight, natWidth, natHeight] = this._bannerView.get_preferred_size();
+ let [, , natWidth, natHeight] = this._bannerView.get_preferred_size();
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
actorBox.x1 = Math.floor(centerX - natWidth / 2);
_getLogoBinAllocation(dialogBox) {
let actorBox = new Clutter.ActorBox();
- let [minWidth, minHeight, natWidth, natHeight] = this._logoBin.get_preferred_size();
+ let [, , natWidth, natHeight] = this._logoBin.get_preferred_size();
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
actorBox.x1 = Math.floor(centerX - natWidth / 2);
_getCenterActorAllocation(dialogBox, actor) {
let actorBox = new Clutter.ActorBox();
- let [minWidth, minHeight, natWidth, natHeight] = actor.get_preferred_size();
+ let [, , natWidth, natHeight] = actor.get_preferred_size();
let centerX = dialogBox.x1 + (dialogBox.x2 - dialogBox.x1) / 2;
let centerY = dialogBox.y1 + (dialogBox.y2 - dialogBox.y1) / 2;
// figure out how tall it would like to be and try to accommodate
// but don't let it get too close to the logo
- let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);
+ let [, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);
let maxWideHeight = dialogHeight - 3 * logoHeight;
wideBannerHeight = Math.min(maxWideHeight, wideBannerHeight);
let hold = new Batch.Hold();
actor.show();
- let [minHeight, naturalHeight] = actor.get_preferred_height(-1);
+ let [, naturalHeight] = actor.get_preferred_height(-1);
actor.opacity = 0;
actor.set_height(0);
let hPadding = leftPadding + rightPadding;
let icon = this._items[this._selectedIndex];
- let [posX, posY] = icon.get_transformed_position();
+ let [posX] = icon.get_transformed_position();
let thumbnailCenter = posX + icon.width / 2;
- let [childMinWidth, childNaturalWidth] = this._thumbnails.get_preferred_width(-1);
+ let [, childNaturalWidth] = this._thumbnails.get_preferred_width(-1);
childBox.x1 = Math.max(primary.x + leftPadding, Math.floor(thumbnailCenter - childNaturalWidth / 2));
if (childBox.x1 + childNaturalWidth > primary.x + primary.width - hPadding) {
let offset = childBox.x1 + childNaturalWidth - primary.width + hPadding;
childBox.x2 = primary.x + primary.width - rightPadding;
childBox.y1 = this._switcherList.allocation.y2 + spacing;
this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1);
- let [childMinHeight, childNaturalHeight] = this._thumbnails.get_preferred_height(-1);
+ let [, childNaturalHeight] = this._thumbnails.get_preferred_height(-1);
childBox.y2 = childBox.y1 + childNaturalHeight;
this._thumbnails.allocate(childBox, flags);
}
}
_enterItem(index) {
- let [x, y, mask] = global.get_pointer();
+ let [x, y] = global.get_pointer();
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, x, y);
if (this._items[index].contains(pickedActor))
this._itemEntered(index);
return;
let totalPadding = this._items[0].get_theme_node().get_horizontal_padding() + this._items[0].get_theme_node().get_vertical_padding();
totalPadding += this.get_theme_node().get_horizontal_padding() + this.get_theme_node().get_vertical_padding();
- let [labelMinHeight, labelNaturalHeight] = this._labels[0].get_preferred_height(-1);
+ let [, labelNaturalHeight] = this._labels[0].get_preferred_height(-1);
let spacing = this._items[0].child.get_theme_node().get_length('spacing');
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let thumbnailSize = THUMBNAIL_DEFAULT_SIZE * scaleFactor;
}
usedWidth() {
- let [availWidthPerPage, availHeightPerPage] = this._getPageAvailableSize();
+ let [availWidthPerPage] = this._getPageAvailableSize();
return this._grid.usedWidth(availWidthPerPage);
}
let sourceAllocation = this._sourceAllocation;
let sourceCenterX = sourceAllocation.x1 + sourceContentBox.x1 + (sourceContentBox.x2 - sourceContentBox.x1) * this._sourceAlignment;
let sourceCenterY = sourceAllocation.y1 + sourceContentBox.y1 + (sourceContentBox.y2 - sourceContentBox.y1) * this._sourceAlignment;
- let [minWidth, minHeight, natWidth, natHeight] = this.get_preferred_size();
+ let [, , natWidth, natHeight] = this.get_preferred_size();
// We also want to keep it onscreen, and separated from the
// edge by the same distance as the main part of the box is
_calculateArrowSide(arrowSide) {
let sourceAllocation = this._sourceAllocation;
- let [minWidth, minHeight, boxWidth, boxHeight] = this.get_preferred_size();
+ let [, , boxWidth, boxHeight] = this.get_preferred_size();
let workarea = this._workArea;
switch (arrowSide) {
if (a.sortGroup != b.sortGroup)
return a.sortGroup - b.sortGroup;
- let ax, bx, y;
- [ax, y] = a.proxy.get_transformed_position();
- [bx, y] = b.proxy.get_transformed_position();
+ let [ax] = a.proxy.get_transformed_position();
+ let [bx] = b.proxy.get_transformed_position();
return ax - bx;
}
this.set_allocation(box, flags);
let [appIcons, showAppsButton] = this.get_children();
- let [showAppsMinHeight, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth);
+ let [, showAppsNatHeight] = showAppsButton.get_preferred_height(availWidth);
let childBox = new Clutter.ActorBox();
childBox.x1 = contentBox.x1;
if (this._dragActorSource && this._dragActorSource.visible) {
// Snap the clone back to its source
[x, y] = this._dragActorSource.get_transformed_position();
- let [sourceScaledWidth, sourceScaledHeight] = this._dragActorSource.get_transformed_size();
+ let [sourceScaledWidth] = this._dragActorSource.get_transformed_size();
scale = sourceScaledWidth ? this._dragActor.width / sourceScaledWidth : 0;
} else if (this._dragOrigParent) {
// Snap the actor back to its original position within
// its parent, adjusting for the fact that the parent
// may have been moved or scaled
let [parentX, parentY] = this._dragOrigParent.get_transformed_position();
- let [parentWidth, parentHeight] = this._dragOrigParent.get_size();
- let [parentScaledWidth, parentScaledHeight] = this._dragOrigParent.get_transformed_size();
+ let [parentWidth] = this._dragOrigParent.get_size();
+ let [parentScaledWidth] = this._dragOrigParent.get_transformed_size();
let parentScale = 1.0;
if (parentWidth != 0)
parentScale = parentScaledWidth / parentWidth;
return;
}
- let [permissions, data] = res;
+ let [permissions] = res;
if (permissions[appId] === undefined) // Not found
this._dialog.open();
else if (permissions[appId] == GRANTED)
if (!this._settings.get_boolean(LOCATE_POINTER_KEY))
return;
- let [x, y, mods] = global.get_pointer();
+ let [x, y] = global.get_pointer();
this._ripples.playAnimation(x, y);
}
};
let primary = Main.layoutManager.primaryMonitor;
- let [minWidth, minHeight, natWidth, natHeight] =
+ let [, , natWidth, natHeight] =
this._eventHandler.get_preferred_size();
let childBox = new Clutter.ActorBox();
// Setting the height to -1 allows us to get its actual preferred height rather than
// whatever was last given in set_height by Tweener.
this._completionActor.set_height(-1);
- let [minHeight, naturalHeight] = this._completionActor.get_preferred_height(this._resultsArea.get_width());
+ let [, naturalHeight] = this._completionActor.get_preferred_height(this._resultsArea.get_width());
// Don't reanimate if we are already visible
if (this._completionActor.visible) {
// Create the first ZoomRegion and initialize it according to the
// magnification settings.
- let mask;
- [this.xMouse, this.yMouse, mask] = global.get_pointer();
+ [this.xMouse, this.yMouse] = global.get_pointer();
let aZoomRegion = new ZoomRegion(this, this._cursorRoot);
this._zoomRegions.push(aZoomRegion);
* @return true.
*/
scrollToMousePos() {
- let [xMouse, yMouse, mask] = global.get_pointer();
+ let [xMouse, yMouse] = global.get_pointer();
if (xMouse != this.xMouse || yMouse != this.yMouse) {
this.xMouse = xMouse;
let childBox = new Clutter.ActorBox();
- let [minWidth, minHeight, naturalWidth, naturalHeight] = this._counterBin.get_preferred_size();
+ let [, , naturalWidth, naturalHeight] = this._counterBin.get_preferred_size();
let direction = this.get_text_direction();
if (direction == Clutter.TextDirection.LTR) {
// this._onNotificationLeftTimeout() to determine if the mouse has moved far enough during the initial timeout for us
// to consider that the user intended to leave the tray and therefore hide the tray. If the mouse is still
// close to its previous position, we extend the timeout once.
- let [x, y, mods] = global.get_pointer();
+ let [x, y] = global.get_pointer();
this._notificationLeftMouseX = x;
this._notificationLeftMouseY = y;
}
_onNotificationLeftTimeout() {
- let [x, y, mods] = global.get_pointer();
+ let [x, y] = global.get_pointer();
// We extend the timeout once if the mouse moved no further than MOUSE_LEFT_ACTOR_THRESHOLD to either side.
if (this._notificationLeftMouseX > -1 &&
y < this._notificationLeftMouseY + MOUSE_LEFT_ACTOR_THRESHOLD &&
Meta.disable_unredirect_for_display(global.display);
this._updateShowingNotification();
- let [x, y, mods] = global.get_pointer();
+ let [x, y] = global.get_pointer();
// We save the position of the mouse at the time when we started showing the notification
// in order to determine if the notification popped up under it. We make that check if
// the user starts moving the mouse and _onNotificationHoverChanged() gets called. We don't
}
_notificationTimeout() {
- let [x, y, mods] = global.get_pointer();
+ let [x, y] = global.get_pointer();
if (y < this._lastSeenMouseY - 10 && !this._notificationHovered) {
// The mouse is moving towards the notification, so don't
// hide it yet. (We just create a new timeout (and destroy
}
_allocateChild(child, x, y, direction) {
- let [prefHeight, natHeight] = child.get_preferred_height(-1);
- let [prefWidth, natWidth] = child.get_preferred_width(natHeight);
+ let [, natHeight] = child.get_preferred_height(-1);
+ let [, natWidth] = child.get_preferred_width(natHeight);
let childBox = new Clutter.ActorBox();
if (direction == LTR) {
}
_xdndToggleOverview() {
- let [x, y, mask] = global.get_pointer();
+ let [x, y] = global.get_pointer();
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y);
if (pickedActor == this && Main.overview.shouldToggleByCornerOrButton())
let allocWidth = box.x2 - box.x1;
let allocHeight = box.y2 - box.y1;
- let [leftMinWidth, leftNaturalWidth] = this._leftBox.get_preferred_width(-1);
- let [centerMinWidth, centerNaturalWidth] = this._centerBox.get_preferred_width(-1);
- let [rightMinWidth, rightNaturalWidth] = this._rightBox.get_preferred_width(-1);
+ let [, leftNaturalWidth] = this._leftBox.get_preferred_width(-1);
+ let [, centerNaturalWidth] = this._centerBox.get_preferred_width(-1);
+ let [, rightNaturalWidth] = this._rightBox.get_preferred_width(-1);
let sideWidth, centerWidth;
centerWidth = centerNaturalWidth;
}
this._rightBox.allocate(childBox, flags);
- let cornerMinWidth, cornerMinHeight;
let cornerWidth, cornerHeight;
- [cornerMinWidth, cornerWidth] = this._leftCorner.actor.get_preferred_width(-1);
- [cornerMinHeight, cornerHeight] = this._leftCorner.actor.get_preferred_height(-1);
+ [, cornerWidth] = this._leftCorner.actor.get_preferred_width(-1);
+ [, cornerHeight] = this._leftCorner.actor.get_preferred_height(-1);
childBox.x1 = 0;
childBox.x2 = cornerWidth;
childBox.y1 = allocHeight;
childBox.y2 = allocHeight + cornerHeight;
this._leftCorner.actor.allocate(childBox, flags);
- [cornerMinWidth, cornerWidth] = this._rightCorner.actor.get_preferred_width(-1);
- [cornerMinHeight, cornerHeight] = this._rightCorner.actor.get_preferred_height(-1);
+ [, cornerWidth] = this._rightCorner.actor.get_preferred_width(-1);
+ [, cornerHeight] = this._rightCorner.actor.get_preferred_height(-1);
childBox.x1 = allocWidth - cornerWidth;
childBox.x2 = allocWidth;
childBox.y1 = allocHeight;
if (!child)
return;
- let [minWidth, natWidth] = child.get_preferred_width(-1);
+ let [, natWidth] = child.get_preferred_width(-1);
let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1;
Main.uiGroup.add_actor(pieTimer);
manager.connect('ptr-a11y-timeout-started', (manager, device, type, timeout) => {
- let [x, y, mods] = global.get_pointer();
+ let [x, y] = global.get_pointer();
pieTimer.start(x, y, timeout);
if (type == Clutter.PointerA11yTimeoutType.GESTURE)
global.display.set_cursor(Meta.Cursor.CROSSHAIR);
_needsScrollbar() {
let topMenu = this._getTopMenu();
- let [topMinHeight, topNaturalHeight] = topMenu.actor.get_preferred_height(-1);
+ let [, topNaturalHeight] = topMenu.actor.get_preferred_height(-1);
let topThemeNode = topMenu.actor.get_theme_node();
let topMaxHeight = topThemeNode.get_max_height();
let targetAngle = this.actor.text_direction == Clutter.TextDirection.RTL ? -90 : 90;
if (animate) {
- let [minHeight, naturalHeight] = this.actor.get_preferred_height(-1);
+ let [, naturalHeight] = this.actor.get_preferred_height(-1);
this.actor.height = 0;
this.actor._arrowRotation = this._arrow.rotation_angle_z;
Tweener.addTween(this.actor,
this._errorMessage.set_text(message);
if (!this._errorBox.visible) {
- let [errorBoxMinHeight, errorBoxNaturalHeight] = this._errorBox.get_preferred_height(-1);
+ let [, errorBoxNaturalHeight] = this._errorBox.get_preferred_height(-1);
let parentActor = this._errorBox.get_parent();
Tweener.addTween(parentActor,
}
_onDragMotion() {
- let [origX, origY] = this._dragAction.get_press_coords(0);
- let [currentX, currentY] = this._dragAction.get_motion_coords(0);
+ let [, origY] = this._dragAction.get_press_coords(0);
+ let [, currentY] = this._dragAction.get_motion_coords(0);
let newY = currentY - origY;
newY = clamp(newY, -global.stage.height, 0);
if (_modes.hasOwnProperty(modeName))
return;
- let fileContent, success, tag, newMode;
+ let fileContent, success, newMode;
try {
- [success, fileContent, tag] = file.load_contents(null);
+ [success, fileContent] = file.load_contents(null);
if (fileContent instanceof Uint8Array)
fileContent = imports.byteArray.toString(fileContent);
newMode = JSON.parse(fileContent);
};
function _setMenuAlignment(entry, stageX) {
- let [success, entryX, entryY] = entry.transform_stage_point(stageX, 0);
+ let [success, entryX] = entry.transform_stage_point(stageX, 0);
if (success)
entry.menu.setSourceAlignment(entryX / entry.width);
}
entry.menu.close(BoxPointer.PopupAnimation.FULL);
return Clutter.EVENT_STOP;
} else if (event.get_button() == 3) {
- let [stageX, stageY] = event.get_coords();
+ let [stageX] = event.get_coords();
_setMenuAlignment(entry, stageX);
entry.menu.open(BoxPointer.PopupAnimation.FULL);
return Clutter.EVENT_STOP;
} else if (direction == Clutter.ScrollDirection.UP) {
delta = SLIDER_SCROLL_STEP;
} else if (direction == Clutter.ScrollDirection.SMOOTH) {
- let [dx, dy] = event.get_scroll_delta();
+ let [, dy] = event.get_scroll_delta();
// Even though the slider is horizontal, use dy to match
// the UP/DOWN above.
delta = -dy * SLIDER_SCROLL_STEP;
// Allocate the switcherList
// We select a size based on an icon size that does not overflow the screen
- let [childMinHeight, childNaturalHeight] = this._switcherList.get_preferred_height(primary.width - hPadding);
- let [childMinWidth, childNaturalWidth] = this._switcherList.get_preferred_width(childNaturalHeight);
+ let [, childNaturalHeight] = this._switcherList.get_preferred_height(primary.width - hPadding);
+ let [, childNaturalWidth] = this._switcherList.get_preferred_width(childNaturalHeight);
childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
this._highlighted = index;
let adjustment = this._scrollView.hscroll.adjustment;
- let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values();
- let [absItemX, absItemY] = this._items[index].get_transformed_position();
+ let [value] = adjustment.get_values();
+ let [absItemX] = this._items[index].get_transformed_position();
let [result, posX, posY] = this.transform_stage_point(absItemX, 0);
- let [containerWidth, containerHeight] = this.get_transformed_size();
+ let [containerWidth] = this.get_transformed_size();
if (posX + this._items[index].get_width() > containerWidth)
this._scrollToRight();
else if (this._items[index].allocation.x1 - value < 0)
}
if (this._squareItems) {
- let [childMin, childNat] = this._maxChildWidth(-1);
+ let [childMin] = this._maxChildWidth(-1);
maxChildMin = Math.max(childMin, maxChildMin);
maxChildNat = maxChildMin;
}
let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1;
- let [minRealNameWidth, minRealNameHeight,
- natRealNameWidth, natRealNameHeight] = this._realNameLabel.get_preferred_size();
+ let [, , natRealNameWidth] = this._realNameLabel.get_preferred_size();
if (natRealNameWidth <= availWidth)
this._currentLabel = this._realNameLabel;
}
_delayedWindowRepositioning() {
- let [x, y, mask] = global.get_pointer();
+ let [x, y] = global.get_pointer();
let pointerHasMoved = (this._cursorX != x && this._cursorY != y);
let inWorkspace = (this._fullGeometry.x < x && x < this._fullGeometry.x + this._fullGeometry.width &&
// this point.)
if (win) {
let [stageX, stageY] = clone.get_transformed_position();
- let [stageWidth, stageHeight] = clone.get_transformed_size();
+ let [stageWidth] = clone.get_transformed_size();
win._overviewHint = {
x: stageX,
y: stageY,
}
// setup new handler
- let [x, y, mask] = global.get_pointer();
+ let [x, y] = global.get_pointer();
this._cursorX = x;
this._cursorY = y;
let size = 0;
for (let child of this.get_children()) {
- let [childMinHeight, childNaturalHeight] = child.get_preferred_height(-1);
+ let [, childNaturalHeight] = child.get_preferred_height(-1);
let height = childNaturalHeight * workArea.width / workArea.height;
if (this._orientation == Clutter.Orientation.HORIZONTAL)
}
let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
- let [containerMinHeight, containerNatHeight] = this._container.get_preferred_height(global.screen_width);
- let [containerMinWidth, containerNatWidth] = this._container.get_preferred_width(containerNatHeight);
+ let [, containerNatHeight] = this._container.get_preferred_height(global.screen_width);
+ let [, containerNatWidth] = this._container.get_preferred_width(containerNatHeight);
this._container.x = workArea.x + Math.floor((workArea.width - containerNatWidth) / 2);
this._container.y = workArea.y + Math.floor((workArea.height - containerNatHeight) / 2);
}
for (let i = 0; i < this._thumbnails.length; i++) {
let thumbnail = this._thumbnails[i];
- let [w, h] = thumbnail.actor.get_transformed_size();
+ let [, h] = thumbnail.actor.get_transformed_size();
if (y >= thumbnail.actor.y && y <= thumbnail.actor.y + h) {
thumbnail.activate(time);
break;
// Allow the reorder target to have a 10px "cut" into
// each side of the thumbnail, to make dragging onto the
// placeholder easier
- let [w, h] = this._thumbnails[i].actor.get_transformed_size();
+ let [, h] = this._thumbnails[i].actor.get_transformed_size();
let targetBottom = targetBase + WORKSPACE_CUT_SIZE;
let nextTargetBase = targetBase + h + spacing;
let nextTargetTop = nextTargetBase - spacing - ((i == length - 1) ? 0 : WORKSPACE_CUT_SIZE);
}
if (i == this._dropPlaceholderPos) {
- let [minHeight, placeholderHeight] = this._dropPlaceholder.get_preferred_height(-1);
+ let [, placeholderHeight] = this._dropPlaceholder.get_preferred_height(-1);
childBox.x1 = x1;
childBox.x2 = x2;
childBox.y1 = Math.round(y);